package com.jinzhi.jzweb.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.jinzhi.common.base.CoreServiceImpl;
import com.jinzhi.jzweb.dao.CertificationBatchDao;
import com.jinzhi.jzweb.domain.CertificationBatchDO;
import com.jinzhi.jzweb.service.CertificationBatchService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 
 * <pre>
 * 认证批次
 * </pre>
 * <small> 2020-02-24 21:00:12 | lance</small>
 */
@Service
public class CertificationBatchServiceImpl extends CoreServiceImpl<CertificationBatchDao, CertificationBatchDO> implements CertificationBatchService {

    @Override
    public List<Map<Object, Object>> selTimeAll() {
        return baseMapper.selTimeAll();
    }

    @Override
    public List<Map<Object, Object>> selTimeAllSecond(Integer day) {
        return baseMapper.selTimeAllSecond(day);
    }

    @Override
    public Map<Object, Object> selDetail(Long id) {
        return baseMapper.selDetail(id);
    }

    @Override
    public List<Map<Object,Object>> selByNameId(){
        return baseMapper.selByNameId();
    }

    @Override
    public Page<CertificationBatchDO> findListPage(int current, int number) {

        Page<CertificationBatchDO> page = new Page<CertificationBatchDO>(current, number);
        return page.setRecords(this.baseMapper.findListPage(page));
    }

    @Override
    public List<CertificationBatchDO> findList() {
        return this.baseMapper.findList();
    }

    @Override
    public List<Map<Object,Object>> selDaysAll(Integer day){
        return baseMapper.selDaysAll(day);
    }

    @Override
    public Page<Map<Object,Object>> selCbatchList(int current, int number,String name) {

        Page<Map<Object,Object>> page = new Page<>(current, number);
        return page.setRecords(this.baseMapper.selCbatchList(page,name));
    }

    @Override
    public Integer selCbatchCount(Long id) {
        return this.baseMapper.selCbatchCount(id);
    }

}
